package by.ostrovsky.webhousingsystem.bean.user.form;

import java.util.Map;

import org.apache.struts2.dispatcher.SessionMap;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;

public abstract class LoginBean extends ActionSupport implements SessionAware {
	private static final long serialVersionUID = 1L;
	protected String login = null;
	protected String password;
	private SessionMap<String, Object> sessionMap;

	@Override
	public void setSession(Map<String, Object> sessionMap) {
		this.sessionMap = (SessionMap<String, Object>) sessionMap;
	}
	
	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}


	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	protected void addSessionParameter(String name, Object object) {
		sessionMap.put(name, object);
	}
}
